<layout name="layout" />

<div class="pageheader">
	<h1 class="pagetitle">直通车选款(数据：{$from} ~ {$to})</h1>
</div>
<link rel="stylesheet" href="/Css/tool.css" type="text/css">
<link rel="stylesheet" href="/Css/jquery.mCustomScrollbar.css" type="text/css">
<script>
	var listItem = {$listItem};
</script>
<div id="contentwrapper" class="contentwrapper nopadding">
	<div class="main">
		<div class="seo-products">
			<div style="margin-left:10px; width:1220px;text-align:center;height:40px;">
				<h4>店铺数据选款推荐</h4>
			</div>
			<div class="select-box fl">
				<div class="box-head">
					<span style="font-size:16px;">支付宝成交件数top榜</span>
				</div>
				<div class="box-body">
					<div class="table-head">
						<div class="fl box-l"></div>
						<div class="fl box-l">排名</div>
						<div class="fl box-c">宝贝</div>
						<div class="fl box-r">成交件数</div>
					</div>
					<div class="table-body-empty" id="pay_goods_num">
						<div class="loading">
							<img src="/Img/loader1.gif" alt="正在加载数据……"><span>正在加载数据……</span>
						</div>
					</div>
				</div>
			</div>
			<div class="select-box fl">
				<div class="box-head">
					<span style="font-size:16px;">访客平均价值top榜</span>
				</div>
				<div class="box-body">
					<div class="table-head">
						<div class="fl box-l"></div>
						<div class="fl box-l">排名</div>
						<div class="fl box-c">宝贝</div>
						<div class="fl box-r">访客平均价值</div>
					</div>
					<div class="table-body-empty" id="avg_visitor_value">
						<div class="loading">
							<img src="/Img/loader1.gif" alt="正在加载数据……"><span>正在加载数据……</span>
						</div>
					</div>
				</div>
			</div>
			<div class="select-box fl">
				<div class="box-head">
					<span style="font-size:16px;">综合评估top榜(支付宝成交件数排名50%+访客平均价值排名50%）</span>
				</div>
				<div class="box-body">
					<div class="table-head">
						<div class="fl box-l"></div>
						<div class="fl box-l">排名</div>
						<div class="fl box-c">宝贝</div>
						<div class="fl box-r">综合数值</div>
					</div>
					<div class="table-body-empty" id="multiple">
						<div class="loading">
							<img src="/Img/loader1.gif" alt="正在加载数据……"><span>正在加载数据……</span>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="clear"></div>
		<div class="simba-products">
			<div style="margin-left:10px; width:1220px;text-align:center;height:40px;">
				<h4>直通车数据选款推荐</h4>
			</div>
			<div class="select-box fl">
				<div class="box-head">
					<span style="font-size:16px;">花费</span>
				</div>
				<div class="box-body">
					<div class="table-head">
						<div class="fl box-l"></div>
						<div class="fl box-l">排名</div>
						<div class="fl box-c">宝贝</div>
						<div class="fl box-r">花费</div>
					</div>
					<div class="table-body-empty" id="cost">
						
					</div>
				</div>
			</div>
			<div class="select-box fl">
				<div class="box-head">
					<span style="font-size:16px;">投入产出比</span>
				</div>
				<div class="box-body">
					<div class="table-head">
						<div class="fl box-l"></div>
						<div class="fl box-l">排名</div>
						<div class="fl box-c">宝贝</div>
						<div class="fl box-r">ROI</div>
					</div>
					<div class="table-body-empty" id="roi">
						
					</div>
				</div>
			</div>
			<div class="select-box fl">
				<div class="box-head">
					<span style="font-size:16px;">综合评估top50(花费排名30%+ROI排名70%）</span>
				</div>
				<div class="box-body">
					<div class="table-head">
						<div class="fl box-l"></div>
						<div class="fl box-l">排名</div>
						<div class="fl box-c">宝贝</div>
						<div class="fl box-r">综合数值</div>
					</div>
					<div class="table-body-empty" id="simba_multiple">
						
					</div>
				</div>
			</div>
		</div>
		<div class="clear"></div>
		<div class="result-products">
			<div style="margin-left:10px; width:1220px;text-align:center;height:40px;">
				<h4>数据选款结果(共<span id="resCount">0</span>款)</h4>
			</div>
			<div class="result-head">
				<table cellspacing="0" cellpadding="0" border="0" class="metrotable datatable table_A">
					<thead>
						<tr height="30">
							<th>宝贝</th>
							<th>宝贝数据</th>
							<th>选款数据依据</th>
							<th width="50" class="center">操作</th>
						</tr>
					</thead>
				</table>
			</div>
			<div class="green result-empty" id="resItems">
				请选择宝贝
			</div>
		</div>
	</div>
</div>
<script type="text/html" id="TBItem">
	<%for (var i=0; i<data.length; i++) {%>
	<div class="item" data-goods_img="<%=data[i]['goods_img']%>" data-itemId="<%=data[i]['goods_id']%>" data-sort="<%=i+1%>" <% if (name == 'pay_goods_num' || name == 'avg_visitor_value' || name == 'multiple') {%>data-pay_conversion_rate="<%=data[i]['pay_conversion_rate']%>" data-pv="<%=data[i]['pv']%>" data-pay_money_num="<%=data[i]['pay_money_num']%>" data-avg_time="<%=data[i]['avg_time']%>" data-cart_count="<%=data[i]['cart_count']%>" data-bounce_rate="<%=data[i]['bounce_rate']%>" data-fav_count="<%=data[i]['fav_count']%>"<%}%>>
		<div class="box-l fl">
			<input name="product_id" type="checkbox" class="checkit" value="<%=data[i]['goods_id']%>" data-is_custom="<%=data[i]['is_custom']%>">
		</div>
		<div class="box-l fl">
			<%=i+1%>
		</div> 
		<div class="box-c">
			<a class="tp-tag-a" href="http://item.taobao.com/item.htm?id=<%=data[i]['goods_id']%>" target="_blank">
				<span><%=data[i]['goods_title']%></span>
			</a>
		</div>
		<div class="box-r fr value">
			<% if (name == 'cost') {%>￥<%}%><span class="<%=name%>"><%=data[i][name]%></span>
		</div>
	</div>
	<%}%>
</script>
<script type="text/html" id="ResultTBItem">
	<%for (var item in data) {%>
	<div class="result-item">
		<table cellspacing="0" cellpadding="0" border="0" class="metrotable datatable table_B">
			<tbody>
				<tr>
					<td>
						<div style="overflow:hidden;">
							<div style="float:left;">
								<a class="tp-tag-a" href="" target="_blank">
									<img src="<%=data[item].goods_img%>">
								</a>
							</div>
							<div style="display:inline-block;word-wrap:break-word;max-width: 230px;margin-left:5px;">
								<a class="tp-tag-a" href="//item.taobao.com/item.htm?id=<%=data[item].goods_id%>" target="_blank">
									<span><%=data[item].goods_title%></span>
								</a>
							</div>
						</div>
					</td>
					<td>
						<table class="multiple">
							<tbody>
								<tr>
									<td>支付转化率：</td>
									<td>
										<%=data[item].seo.other.pay_conversion_rate%>
									</td>
									<td>商品浏览量：</td>
									<td>
										<%=data[item].seo.other.pv%>
									</td>
								</tr>
								<tr>
									<td>支付金额：</td>
									<td>
										<%=data[item].seo.other.pay_money_num%>
									</td>
									<td>平均停留时间：</td>
									<td>
										<%=data[item].seo.other.avg_time%>
									</td>
								</tr>
								<tr>
									<td>加购物车数：</td>
									<td>
										<%=data[item].seo.other.cart_count%>
									</td>
									<td>详情页跳出率：</td>
									<td>
										<%=data[item].seo.other.bounce_rate%>
									</td>
								</tr>
								<tr>
									<td>收藏人数：</td>
									<td>
										<%=data[item].seo.other.fav_count%>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
					<td>
						<!--<div>
							<span>店铺数据：</span><br>
							<span>
								支付宝成交件数: <span class="red"><%=data[item].seo.pay_goods_num%></span> ；<br>平均访问价值: <span class="red"><%=data[item].seo.avg_visitor_value%></span> ；<br>综合排名: <span class="red"><%=data[item].seo.order%></span>
							</span>
						</div>
						<div>
							直通车数据：
							<span>
								花费: <span class="red"><%=data[item].simba.cost%></span> ；<br>ROI: <span class="red"><%=data[item].simba.roi%></span> ；<br>综合排名: <span class="red"><%=data[item].simba.order%></span>
							</span>
						</div>
						<div>
							是否掌柜推荐款：<input type="checkBox" <% if (data[item].is_custom) { %>checked<%}%>>
						</div>-->
						<table class="result-item-data multiple nopadding">
							<tbody>
								<tr>
									<td style="text-align:center">店铺数据：</td>
									<td>
										<div>支付宝成交件数: <span class="red"><%=data[item].seo.pay_goods_num%></span> ；排名: <span class="red"><%=data[item].seo.pay_goods_num_order%></span></div>
										<div>平均访问价值: <span class="red"><%=data[item].seo.avg_visitor_value%></span> ；排名: <span class="red"><%=data[item].seo.avg_visitor_value_order%></span></div>
										<div>综合排名: <span class="red"><%=data[item].seo.order%></span></div>
									</td>
								</tr>
								<tr>
									<td style="text-align:center">直通车数据：</td>
									<td>
										<div>花费: <span class="red"><%=data[item].simba.cost%></span> ；排名: <span class="red"><%=data[item].simba.cost_order%></span></div>
										<div>ROI: <span class="red"><%=data[item].simba.roi%></span> ；排名: <span class="red"><%=data[item].simba.roi_order%></span></div>
										<div>综合排名: <span class="red"><%=data[item].simba.order%></span></div>
									</td>
								</tr>
								<tr>
									<td style="border:none;text-align:center">是否掌柜推荐款：</td>
									<td style="border:none;">
										<input type="checkBox" <% if (data[item].is_custom) { %>checked<%}%>>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
					<td width="50" class="center">
						<a href="javascript:;" class="deleteItem" data-itemid="<%=data[item].goods_id%>">删除</a>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	<%}%>
</script>
<script>
	var itemSelect = new $.selectProductsHelper();
	itemSelect.init();
</script>
